package localFiles;

/***
 * @author Ragnvald Fuglestein
 */

import java.io.File;
import java.util.LinkedList;

public class PathExtractionPattern {
	public LinkedList<PathExtractionSubPattern> fields = new LinkedList<PathExtractionSubPattern>();
	public int level = 1;
	public PathExtractionPattern(String pattern) {
		File f = new File(pattern);
		fields.addFirst(new PathExtractionSubPattern(f.getName()));
		while ((f = f.getParentFile()) != null) {
			fields.addFirst(new PathExtractionSubPattern(f.getName()));
			level++;
		}
	}
}
